Carbon


NSetPalette

Header: Palettes.h Carbon status: Supported

Associates a new palette with a window.

void NSetPalette (
    WindowRef dstWindow, 
    PaletteHandle srcPalette, 
    SInt16 nCUpdates
);
Parameter descriptions
dstWindow

A pointer to the window to which you want to assign a new palette.

srcPalette

A handle to the palette you want to assign.

nCUpdates

An integer value in which you specify whether the window is to receive updates as a result of various changes to the color environment. See “Usage and Update Constants” for a description of the update options.

DISCUSSION

NSetPalette changes the palette associated with the window specified in the dstWindow parameter to the palette specified by srcPalette. NSetPalette also records whether the window is to receive updates as a result of changes to its color environment. The update constants, which you pass to the nCUpdates parameter, determine when the window is updated.

This function is identical to the SetPalette function except that the nCUpdates parameter is an integer rather than a Boolean value, so that a variety of conditions can trigger an update event.

Use the SetPalette function if you do not need the flexibility that NSetPalette provides for update events.

Use the GetNewPalette function or the NewPalette function to create a new palette. To dispose of a palette, use the DisposePalette function.

VERSION NOTES

This function is available in system software versions 6.0.2 and later.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)